/**
 * @ClassName Demo04
 * @Description: TODO 101-200之间共有？个素数
 * @Author: MaykkSTAR@163.com
 * @DATE: 2022/12/18 9:59
 */
public class Demo04 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 101; i <= 200; i++) {
            boolean isPrime = true;
            for (int j = 2; j < i; j++) {
                if (i % j == 0) {
                    isPrime = false;
                    break;
                }
            }
            if (isPrime) {
                System.out.print(i + " ");
                count++;
            }
        }
        System.out.println("\n101-200之间共有" + count + "个素数");
    }
}